﻿//-----------------------------------------------------------------------------------------
// <copyright file="Site.cs" company="Jakub Florczyk (www.jakubflorczyk.pl)">
//      Copyright © 2009 Jakub Florczyk (www.jakubflorczyk.pl)
//      http://flakernet.codeplex.com
// </copyright>
//-----------------------------------------------------------------------------------------

namespace FlakerNET
{
    using System;
    using FlakerNET.Converters;
    using Newtonsoft.Json;

    /// <summary>
    /// Definicja witryny.
    /// </summary>
    public class Site
    {
        /// <summary>
        /// Identyfikator witryny.
        /// </summary>
        [JsonProperty("site_id")]
        [JsonConverter(typeof(Int32Converter))]
        public int Id { get; set; }

        /// <summary>
        /// Identyfikator użytkownika witryny.
        /// </summary>
        [JsonProperty("site_user_id")]
        [JsonConverter(typeof(Int32Converter))]
        public int UserId { get; set; }

        /// <summary>
        /// Adres witryny.
        /// </summary>
        [JsonProperty("site_url")]
        [JsonConverter(typeof(UriConverter))]
        public Uri Url { get; set; }
            
        /// <summary>
        /// Nazwa witryny.
        /// </summary>
        [JsonProperty("site_name")]
        public string Name { get; set; }

        /// <summary>
        /// Czy witryna usunięta.
        /// </summary>
        [JsonProperty("site_deleted")]
        [JsonConverter(typeof(BooleanConverter))]
        public bool Deleted { get; set; }
            
        /// <summary>
        /// Timestamp utworzenia witryny.
        /// </summary>
        [JsonProperty("site_createdon")]
        [JsonConverter(typeof(Int32Converter))]
        public int CreatedOn { get; set; }      
    }
}
